package com.comtime.view;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.PopupWindow;

import com.comtime.smartkilimanjaro.R;;

public class ActionSheet extends PopupWindow {

	View view;
	Button btn_top,btn_center,btn_down;
	public ActionSheet(Context context,OnClickListener onClickListener,String topButton,String centerButton,String downButton){
		super(context);
		LayoutInflater inflater = (LayoutInflater) context
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		view = inflater.inflate(R.layout.popupwindow_photo, null);
		btn_top=(Button) view.findViewById(R.id.btn_top);
		btn_center=(Button) view.findViewById(R.id.btn_center);
		btn_down=(Button) view.findViewById(R.id.btn_down);
		
		btn_top.setText(topButton);
		btn_center.setText(centerButton);
		btn_down.setText(downButton);
		
		btn_top.setOnClickListener(onClickListener);
		btn_center.setOnClickListener(onClickListener);
		btn_down.setOnClickListener(onClickListener);
		
		this.setContentView(view);
		
		this.setWidth(LayoutParams.MATCH_PARENT);
		this.setHeight(LayoutParams.WRAP_CONTENT);
		this.setFocusable(true);
		this.setAnimationStyle(R.style.AnimBottom);
//		ColorDrawable dw = new ColorDrawable(0x00000000);
//		this.setBackgroundDrawable(dw);
	}
	
}
